<meta charset="utf-8">
<?php
/*include_once('init.php');*/
	if(!empty($_POST)) {
	
		

	/*	print_r($_POST);die;
		$_POST['power']=implode(',',$_POST['power']);*/

		
		
	
			
		$row=add('power',$_POST);
    
        if ($row>0) {
        	echo '<script>alert("添加成功");location.href="index.php?c=role&a=add&admin=1";</script>';

        }else{
        	echo '<script>alert("添加失败");history.go(-1);</script>';die;
        }
		

	}

		$date=gatselect('power','`pid`=0');



	include( VIEW_PATH.$admin.'layst.html');

?>
